<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var threeConsecutiveOdds = function(arr) {
			    // 是否为奇数
			    const isOdd = num => num % 2 !== 0;
			    for(let p1 = 0, p2 = 1, p3 = 2;p3 < arr.length; p1++,p2++,p3++) {
			        if(isOdd(arr[p1]) && isOdd(arr[p2]) && isOdd(arr[p3])) return true;
			    }
			    return false;
			};
			console.log(threeConsecutiveOdds([2,6,4,1]));
		</script>
	</body>
</html>
